$(document).ready(function () {

        mui.init({
                swipeBack: true //启用右滑关闭功能
        });

        getTitle();
});

function getTitle() {
        let Request = {};

        Request = GetRequest();
        const title_type = Request['type'];

        const secondPageTitle = $(".mui-title");

        switch (title_type) {
                case "homeTitle01":
                        $(".second_page_list01").css("display", "block");
                        secondPageTitle.text("食安查询");
                        break;
                case "homeTitle02":
                        $(".second_page_list02").css("display", "block");
                        secondPageTitle.html("药品查询");
                        break;
                case "homeTitle03":
                        $(".second_page_list03").css("display", "block");
                        secondPageTitle.html("从业人员");
                        break;
                case "homeTitle04":
                        $(".second_page_list04").css("display", "block");
                        secondPageTitle.html("曝光公示");
                        break;
                case "homeTitle05":
                        $(".second_page_list05").css("display", "block");
                        secondPageTitle.html("宴席备报");
                        break;
                case "homeTitle06":
                        $(".second_page_list06").css("display", "block");
                        secondPageTitle.html("备案管理");
                        break;
                case "homeTitle07":
                        $(".second_page_list07").css("display", "block");
                        secondPageTitle.html("执法定位");
                        break;
                case "homeTitle08":
                        $(".second_page_list08").css("display", "block");
                        secondPageTitle.html("附近企业");
                        break;
                case "homeTitle09":
                        $(".second_page_list09").css("display", "block");
                        secondPageTitle.html("日常监管");
                        break;
                case "homeTitle10":
                        $(".second_page_list10").css("display", "block");
                        secondPageTitle.html("快检管理");
                        break;
                case "homeTitle11":
                        $(".second_page_list11").css("display", "block");
                        secondPageTitle.html("视频监控");
                        break;
                case "homeTitle12":
                        $(".second_page_list12").css("display", "block");
                        secondPageTitle.html("行政监察");
                        break;
                case "homeTitle13":
                        $(".second_page_list13").css("display", "block");
                        secondPageTitle.html("统计分析");
                        break;
                case "homeTitle14":
                        $(".second_page_list14").css("display", "block");
                        secondPageTitle.html("电子政务");
                        break;
                case "homeTitle15":
                        $(".second_page_list15").css("display", "block");
                        secondPageTitle.html("数据同步");
                        break;
        }
}

function GetRequest() {
        const url = location.search; //获取url中含"?"符后的字串
        const theRequest = {};
        if (url.indexOf("?") !== -1) {
                const str = url.substr(1);
                strs = str.split("&");
                for (let i = 0; i < strs.length; i++) {
                        theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
                }
        }
        return theRequest;
}